I wrote a second R guide to help students navigate and use R and RStudio in their biostatistics course. I focused on creating vectors, matrices, and dataframes.
The guide can be found on my RPubs site.
“Internal Validity”: A blog about stuff
I wrote a second R guide to help students navigate and use R and RStudio in their biostatistics course. I focused on creating vectors, matrices, and dataframes.
The guide can be found on my RPubs site.
I ran into a problem where I had two risk ratios, but I wanted to evaluate the statistical difference between them. I couldn’t find an R
package, but I found a paper by Altman and Bland that go over the step-by-step process. I wrote a tutorial on how to perform this method using R, which is available on my RPubs page (link).
Reference:
Altman DG, Bland JM. Interaction revisited: the difference between two estimates. BMJ. 2003 Jan 25;326(7382):219. doi: 10.1136/bmj.326.7382.219. PMID: 12543843; PMCID: PMC1125071.
Often, when we input data into a spreadsheet, we use the wide format where the sequence of variables are ordered according to the columns. But when we perform longitudinal analyses, we need to transform this to the long format.
Sometimes, I forget how to do this in R, so I decided to write a tutorial to remind myself how to do this.
Therefore, I wrote a tutorial on using the pivot_longer()
function to transform data from the wide to long format in preparation for longitudinal data analysis. The tutorial is located on my RPubs page.
There are times when you are looking for a dataset to test a code or formula, but they are hard to find or are not publicly available. To get around this problem, we can generate our own data. R
provides several tools for us to accomplish this.
I wrote a short guide on how to generate data using the simstudy
package in R
. You can read how to do this on my Rpub site (link).
I created a tutorial on how to use the AdhereR
package in R
to estimate the medication adherence rate for a sample of individuals with prescription claims data. I posted the tutorial on my RPubs page (link).
The two most common medication adherence meaures are the Medication Possession Ratio (MPR) and the Proportion of Days Covered (PDC). This tutorial reviews how to estimate these medication adherence rates using AdhereR
in R
.
I wrote an introductory tutorial on how to perform propensity score matching using R, which has been posted on my RPubs site (link).
Propensity score matching is a statistical approach to balancing the observed covariates between groups. In observational studies, this method has the potential to mitigate potential confounding and allow us to make causal interpretations. However, there are a lot of approaches and nuances. This intorductory tutorial presents the basics of propensity score methods and how we can use these in our conventional analyses.
I wrote a tutorial on how to perform simple prepost analysis using R, which is available on my RPubs page. It covers how to compare two differences (change in value before and after an interention) using independent t test and linear regression approaches. However, it doesn’t cover how to address correlation between two dependent values. Part 2 of prepost analysis will cover those issues.
I wrote a collection of tips and tricks (guide) for R and RStudio (link). This is a work in progress, and I plan to update this in the fiture.
In cost-effectiveness analysis, we deal with uncertainty in our parameters by performing sensitivity analyses. In this article, I review how we can generate these distributions for common paramters in a cost-effectiveness analysis. You can view the article at my RPubs page.
I was interested in learning how to apply the Callaway & Sant'Anna staggered difference-in-differences framework to my work. After reading several papers and watching the video by Sant'Anna, I wrote a short tutorial on how to apply this framework to a simulated data. The tutorial is located on my RPubs site.
This is a unique method that used the R “did” package, which is based on the paper by Callaway & Sant’Anna.